package com.wt.config;

import com.wt.service.HelloService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created with IDEA
 * Describe:这是一个配置类，指明当前类是一个配置类
 * Author:tianji
 * Date:2018/10/11
 * Time:14:22
 */

@Configuration
public class MyAppConfig {

    @Bean
    public HelloService helloService(){
        System.out.println("配置类@Bean给容器中添加组件了");
        return new HelloService();
    }
}
